1. Field of the Invention
The present invention relates to different types of communication terminal devices, such as printing, display, and cash-handling devices, used inside kiosk terminals, automated transaction machines (ATMs), automated cash dispensers (CD), and POS systems, and relates more particularly to a communication terminal device capable of initializing an automatic reporting function when the power is turned on, and to an initialization method for the communication terminal device.
2. Description of the Related Art
A typical ATM, cash dispenser, POS terminal, or kiosk terminal today comprises therein in addition to the main control device, such as a personal computer (referred to below as a PC or host device), various terminal process devices, such as a printer, display, cash storage device, or bar code reader, for accomplishing particular processes. The host provides central control for the overall operation of the particular ATM, POS terminal, or other device (referred to below as the “main terminal device”), and controls operation of the various terminal process devices that are part of the main terminal device. More specifically, the host controls operation of a terminal process device by sending control commands and related data to the terminal process device. Many terminal process devices disposed internally to a main terminal device are connected to the host by way of a serial port (such as RS-232C), and commands and process data are sent both ways between the host and terminal process device.
An interface device is also disposed between these devices, and a control line for communications control is provided. For example, a terminal process device can use a data terminal ready (DTR) signal to inform the host whether the terminal process device can receive data. When the DTR signal goes active, the host sets the data set ready (DSR) signal active, thus confirming that both terminals can communicate with the other before sending data. This prevents loss of data during data communication. It should be noted that terminal process devices such as described above are herein called “communication terminal devices”.
A printer such as commonly used in ATMs and POS systems enters a hold mode in which retrieving data from the receive buffer is temporarily stopped (below, this printer state is referred to as “off-line”) when the cover is open or an error occurs because of a paper jam, for example. When the printer is off-line, the DTR signal goes inactive, thus informing the host that the communication terminal device (the printer in this case) is busy. In response to this busy signal, the general purpose operating system (OS) used on the host then pauses sending data to the communication terminal device until the DTR signal goes active again. When the problem causing the off-line state is resolved and the DTR signal goes active again, the host resumes sending data and thus resumes the printing process or other process interrupted when the terminal went off-line. If measures appropriate to the cause of the off-line state are not taken, various problems could occur.
For example, when a paper jam or other error occurs on the printer side, the DTR signal goes inactive, requiring an interruption in data transmission. When the operator then rectifies the error and resets the printer, the data received by the printer but not printed is lost.
Such problems as loss of data can be avoided, however, by sending a control command appropriate to the error status if the host software can detect the status of the communication terminal device. However, the following issues must be addressed if the host is to perform such a process.
(1) General purpose serial port drivers and printer drivers cannot forward commands from the host when the DTR signal is inactive.
(2) Even if data can be transmitted, the communication terminal device, e.g., printer, stops the command interpretation process when it goes off-line. Therefore, even if the control command is sent to the communication terminal device, the communication terminal device does nothing with the command while it is off-line.
To resolve problem (1) above, (a) a communication terminal device has been proposed that uses a method whereby the DTR signal is set inactive only when the receive buffer is full, and in all other off-line states keeps the DTR signal in an active state.
With a communication terminal device thus comprised control commands can be sent to the communication terminal device from the host even when the communication terminal device is off-line insofar as the receive buffer is not full.
To resolve problem (2) above, (b) a communication terminal device having a special control command (referred to below as a “real-time command”) has been proposed. This communication terminal device immediately executes a real-time command as soon as it is received so that a special process can be run even when the communication terminal device is off-line.
To resolve both problems (1) and (2) above, (c) a communication terminal device having a function (referred to below as an “auto-status back” (ASB) function) for automatically notifying the host of a change in a particular communication terminal device status when said device status changes.
If the communication terminal device is off-line from the time the power is turned on because of some problem, however, it is difficult even with the communication terminal devices described as (a), (b), and (c) above for the host to run an appropriate status handling process.
By way of example, what happens with a communication terminal device combining the above-noted related-art technologies (a) and (b), that is, a communication terminal device that holds the DTR signal active except when the receive buffer is full and can execute a particular process in response to a particular real-time command, is described below.
Assume that the cover is open when the power is turned on. In this case the host can send to the communication terminal device a real-time command polling the current status of the communication terminal device. The host can thus determine that the cover of the communication terminal device is currently open.
To resume the printing or other process after the cover open condition is resolved, the host sends frequent real-time commands checking whether the cover open status has changed. Each real-time command is executed as soon as it is received by the communication terminal device, and is then stored to the receive buffer after execution.
As also noted above, the communication terminal device stops interpreting commands in the receive buffer when off-line. This means that the received real-time commands sequentially accumulate in the receive buffer. The receive buffer thus becomes filled by the accumulated real-time command, and a buffer full state occurs. When the receive buffer is full, the printer tells the host that the printer is busy. The host thus becomes unable to send real-time commands, and becomes unable to control the communication terminal device.
Problems such as described below can occur with the ASB function described as related-art technology (c) above. The ASB function is only enabled once the host sends a normal command (that is, not a real-time command as noted above) initializing (activating) the ASB function after the power is turned on. The ASB function is therefore not enabled (active) when the power is turned on, and if the ASB function is required it must first be enabled by means of a normal command. However, if the communication terminal device is off-line from when the power is turned on, the command enabling the ASB function is not interpreted, the host therefore cannot initialize the ASB function, and the ASB function therefore clearly cannot be used.